package xyz.riceball.job.config;

import org.quartz.Scheduler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;

import javax.annotation.Resource;

/**
 * <p>
 * 定时任务配置
 * </p>
 *
 * @author xiaovcloud
 * @since 2022/6/12 19:35
 */
@Configuration
public class QuartzConfig {


    @Resource
    private SchedulerFactoryBean schedulerFactoryBean;


    @Bean
    public Scheduler scheduler() {
        return schedulerFactoryBean.getScheduler();
    }

}
